API Documentation
Public Member Functions | List of all members
nkExport::ExportError Class Referencefinal

Holds information about a failure when trying to import an object using an Exporter. More...

Public Member Functions

 ExportError ()
 
 ExportError (const nkMemory::StringView &errorDesc, const nkMemory::StringView &errorInfos, unsigned int index)
 
 ~ExportError ()
 
void setErrorDesc (const nkMemory::StringView &desc)
 
void setErrorInfo (const nkMemory::StringView &infos)
 
void setIndex (unsigned int index)
 
void setActivated (bool value)
 
const nkMemory::StringViewgetErrorDesc () const
 
const nkMemory::StringViewgetErrorInfo () const
 
unsigned int getIndex () const
 
bool isActivated () const
 

Detailed Description

Holds information about a failure when trying to import an object using an Exporter.

Constructor & Destructor Documentation

◆ ExportError() [1/2]

nkExport::ExportError::ExportError ( )

Default constructor.

◆ ExportError() [2/2]

nkExport::ExportError::ExportError ( const nkMemory::StringView errorDesc,
const nkMemory::StringView errorInfos,
unsigned int  index 
)

Constructor allowing to populate all data at once.

Parameters
errorDescA message describing the error. For instance, "parsing error".
errorInfosBonus information about the error. For instance, a trace of where a parsing error occurred.
indexAn index pointing the error in the source.

◆ ~ExportError()

nkExport::ExportError::~ExportError ( )

Destructor.

Member Function Documentation

◆ setErrorDesc()

void nkExport::ExportError::setErrorDesc ( const nkMemory::StringView desc)

Allows to set a new error description.

Parameters
descThe description of the error.

◆ setErrorInfo()

void nkExport::ExportError::setErrorInfo ( const nkMemory::StringView infos)

Allows to set new bonus information for the error.

Parameters
infosBonus information about the error.

◆ setIndex()

void nkExport::ExportError::setIndex ( unsigned int  index)

Allows to set the index at which the error as been found, in the sources.

Parameters
indexThe new index.

◆ setActivated()

void nkExport::ExportError::setActivated ( bool  value)

Allows to set whether the error has been triggered or not.

Parameters
valueWhether the error is flagged as being triggered (true) or not (false).

◆ getErrorDesc()

const nkMemory::StringView& nkExport::ExportError::getErrorDesc ( ) const
Returns
The error description, if triggered.

◆ getErrorInfo()

const nkMemory::StringView& nkExport::ExportError::getErrorInfo ( ) const
Returns
Bonus information about the error, if triggered.

◆ getIndex()

unsigned int nkExport::ExportError::getIndex ( ) const
Returns
The index in the source from where the error has been triggered, if any.

◆ isActivated()

bool nkExport::ExportError::isActivated ( ) const
Returns
Whether the error has been triggered (true) or not (false).

The documentation for this class was generated from the following file: